package com.zb.Service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.zb.Service.WorkService;
import com.zb.entity.Work;
import com.zb.mapper.WorkMapper;

@Component("WorkService")
public class WorkServiceImpl implements WorkService {
	@Autowired
	private WorkMapper workMapper;

	public List<Work> findWork() {
		return workMapper.findWork();
	}

	public void saveWork(Work work) {
		workMapper.saveWork(work);
	}

	public void delectWork(int id) {
		workMapper.delectWork(id);
	}

	public void updateWork(Work work) {
		workMapper.updateWork(work);
	}

	public Work getWorkById(int id) {
		return workMapper.getWorkById(id);
	}

	public int getMaxId() {
		
		return workMapper.getMaxId();
	}
	
}